package com.test.listener;

import java.io.Serializable;

import javax.servlet.http.HttpSessionActivationListener;
import javax.servlet.http.HttpSessionBindingEvent;
import javax.servlet.http.HttpSessionBindingListener;
import javax.servlet.http.HttpSessionEvent;

public class MyData implements HttpSessionBindingListener,
		HttpSessionActivationListener, Serializable
{
	private int data;
	public MyData(){};
	public MyData(int data)
	{
		this.data = data;
	}
	public int getMyData()
	{
		return this.data;
	}
	public void setMyData(int data)
	{
		this.data = data;
	}

	/**
	 * 
	 */
	private static final long serialVersionUID = 144444L;

	@Override
	public void sessionDidActivate(HttpSessionEvent arg0)
	{
		System.out.println("sessionDidActivate");
	}

	@Override
	public void sessionWillPassivate(HttpSessionEvent arg0)
	{
		System.out.println("sessionWillPassivate");
	}

	@Override
	public void valueBound(HttpSessionBindingEvent arg0)
	{
		System.out.println("valueBound");
	}

	@Override
	public void valueUnbound(HttpSessionBindingEvent arg0)
	{
		System.out.println("valueUnbound");
	}

}
